﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
    
}
@model IEnumerable<MvcEnrollment.Models.Student>
<style type="text/css">
    ul#menu2 {
        font-size: 1.3em;
        font-weight: 600;
        padding: 0;
    }

        ul#menu2 li {
            display: inline;
            list-style: none;
            padding-left: 15px;
        }

            ul#menu2 li a {
                background: none;
                color: #999;
                text-decoration: none;
            }
</style>
<h2>Dashboard</h2>
<br />

<ul id="menu2">
    <li>@Html.ActionLink("Direct Payments", "Direct")</li>
    <li>@Html.ActionLink("Recurring Payments", "Recurring")</li>
</ul>
<h2>All payments</h2><br />
<table>
    <tr>        
        <th>
            @Html.DisplayNameFor(model => model.ID)
        </th>
        <th>
            Student
        </th>
        <th>Course</th>
        <th>Installment</th>
        <th>Transaction start time</th>
        <th>Total Amount</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ID)
        </td>
        <td>
            @item.FirstName &nbsp; @item.LastName
        </td> 
        <td>@item.Course.Name</td>
        <td>@item.Payment.PaymentOption</td>
        <td>@item.StartDate</td>
        <td>@item.Payment.TotalAmount</td>
        <td>@Html.ActionLink("View Transaction Details", "Details", new { id=item.ID })</td>
    </tr>
}

</table>